﻿<%@ Page Title="" Language="C#" MasterPageFile="~/PageTemplate.Master" AutoEventWireup="true" CodeBehind="CartView.aspx.cs" Inherits="RMS.Pages.CartView" %>

<asp:Content ID="Content1" ContentPlaceHolderID="BodyContent" runat="server">
    <!-- Cart Web Form displays / handles cart information.  Also allows initiate Retreat Registration process. -->
    <div>
        <h1>Current Retreat Selections</h1>
        <hr />
        <div id="CartSection" runat="server">
            <table id="cartTable">
                <thead><tr>
                    <th>Retreat Title</th>
                    <th>Cost</th>
                    <th>Qty</th>
                </tr></thead>

                <tbody>
                    <asp:Repeater ID="Repeater1" ItemType="RMS.Models.CartLine" SelectMethod="GetCartLines" runat="server" EnableViewState="false">
                        <ItemTemplate>
                            <tr>
                                <td><%# Item.Retreat.Ret_Title %></td>
                                <td><%# Item.Retreat.Ret_Cost.ToString("c")%></td>
                                <td><%# Item.Quantity%></td>
                                <td> 
                                    <button type="submit" class="myButton" name="remove" value="<%#Item.Retreat.Ret_ID %>">Remove</button>
                                </td>
                             </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                </tbody>

                <tfoot><tr>
                    <td>Total:</td>
                    <td><%= CartTotal.ToString("c") %></td>
                </tr></tfoot>
            </table>
        </div>
        <div id="EmptyCart" runat="server">
            <span>No retreats currently selected.</span>
            <br />
        </div>
        <br />
        <br />
        <h3> Proceed with Registration:</h3>
        <hr />
        <ul>
            <li>
                <span class="greentext"><i>You must select a single unique retreat to continue registering.</i></span>
            </li>
            <li>
                <span class="greentext"><i>For multiple guest registration, you can add additional retreat selections (See quantity)</i></span>
            </li>
        </ul>
        <span><i>Current Unique Retreat Selections: </i><%= CountCartLines()%></span>
        <p><br /></p>
                      
        <!-- Cart Page Button Links -->
        <table class="CartButtonTable">
            <tr>
                <td>
                   <div id="continueButtonSection" runat="server">
                       <asp:Button ID="btnContinueBrowsing" runat="server" CssClass="myButton" Text="Continue Browsing Retreats" OnClick="btnContinueBrowsing_Click" />
                   </div>
                    
                </td>
                <td>
                    <div id="registerButtonSection" runat="server">
                        <asp:Button ID="btnRegisterForRetreat" runat="server"  CssClass="myGlowButton" Text="Register for Retreat" OnClick="btnRegisterForRetreat_Click" />
                    </div>
                    
                </td>
            </tr>
        </table>
          
    </div>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="SidebarContent" runat="server">
    <SS:CatLinks ID="CatLinks1" runat="server" />
</asp:Content>
